package joodle.si;

import java.io.File;
import java.util.Collection;

import joodle.domain.Shape;

/**
 * This interface along with its concrete subclasses provides a family of builders for shapes saved 
 * in various formats. Joodle has built-in support for SVG(XML) format. In case a builder encounters 
 * an error in the input stream it will throw a ParseException to notify classes upper on the stack 
 * call. This interface along with its concrete subclasses reifies the Builder design pattern.
 * <p><center>
 * <img src="http://ug.bcc.bilkent.edu.tr/~m_ozdal/Site/Reports_files/design_files/image014.jpg" />
 * </center></p>
 */
public interface ShapeBuilder {
	/**
	 * Parses a given XML file into a collection of shapes
	 * @param f XML file to be parsed
	 * @return a collection of shapes
	 * @throws SVGParseException
	 */
	public Collection<Shape> parse(File f) throws SVGParseException;
}
